<?php
use common\components\helpers\Fun;
use yii\helpers\Html;
use common\components\extenders\MenuManage;
?>
<div class="docs-main">
    <table id="tablesaw" class="tablesaw table yx-table1 yx-table5 table-striped with-check"  >
    <tr class="yx-bgd2f6ec">
        <td>课程名称</td>
        <td>上课日期</td>
        <td>上课时间</td>
        <td>课次</td>
        <td>状态</td>
        <td>操作</td>

    </tr>
    <?php foreach ($details as $i => $v) { ?>
        <tr>
            <td><?=\yii\helpers\Html::encode($v->title)?></td>
            <td><?=\Yii::$app->formatter->asDate($v->class_date)?></td>
            <td><?=\common\components\helpers\Fun::getClassTime($v->start_time,$v->end_time)?></td>
            <td><?=\yii\helpers\Html::encode($v->lesson)?></td>
            <td><?php if($v->status==0){echo '未上课';}elseif($v->status==1){echo '已上课';}elseif($v->status==2){echo '教师请假';}elseif($v->status==3){echo '学生请假';}elseif($v->status==4){echo '教师停课';}elseif($v->status==5){echo '代课';}elseif($v->status==6){echo '复课';}?></td>
            <td><?=(new MenuManage(MenuManage::TOP_MENU))->detailsMenu('oldclassmanage','status',true,['class' => 'btn yx-radius2 yx-d-card yx-bg94d5a2','id'=>"lesson$i",'data'=>['lesson_id'=>$v['lesson_id']]]);?></td>
        </tr>
    <?php } ?>
    </table>
</div>